<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"> 

<h:head></h:head> 
<body>
<p:panel header="Cadastro de Centro">	 
	<h:form>
		<p:panelGrid columns="2">

			ID: <p:inputText value="#{melosoBean.meloso.id}" ></p:inputText>
			Nome: <p:inputText value="#{melosoBean.meloso.nome}"></p:inputText>
			Centro:
				<h:selectOneMenu value="#{melosoBean.meloso.centro}"
					converter="centroConverter">
		
				<f:selectItems value="#{centroBean.buscarTodos}"
				var="cent" itemLabel="#{cent.nome}" />
			
		
		</h:selectOneMenu>
			
		</p:panelGrid>
			<h:form>
				<p:commandButton value="Salvar" size="10" action="#{melosoBean.salvar()}" ajax="false"></p:commandButton>	
				<p:commandButton value="Menu" action="#{menuBean.index}" ajax="false"></p:commandButton>	
				
			</h:form>
	</h:form>
</p:panel>


</body> 
</html>
